.class public Les/nk;
.super Landroid/widget/RelativeLayout;
.source "NativeCPUView.java"


# instance fields
.field private a:Landroid/view/View;

.field private b:Landroid/widget/TextView;

.field private c:Landroid/widget/ImageView;

.field private d:Landroid/widget/ImageView;

.field private e:Landroid/widget/ImageView;

.field private f:Landroid/widget/ImageView;

.field private g:Landroid/widget/ImageView;

.field private h:Landroid/widget/TextView;

.field private i:Landroid/widget/TextView;

.field private j:Ljava/lang/String;

.field private k:Ljava/lang/String;

.field private l:Ljava/lang/String;

.field private m:Ljava/lang/String;

.field private n:Ljava/lang/String;

.field private o:Ljava/lang/String;

.field private p:Ljava/lang/String;

.field private q:Landroid/view/ViewGroup;


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 1

    const/4 v0, 0x0

    .line 1
    invoke-direct {p0, p1, v0}, Les/nk;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .locals 1

    const/4 v0, 0x0

    .line 2
    invoke-direct {p0, p1, p2, v0}, Les/nk;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
    .locals 0

    .line 3
    invoke-direct {p0, p1, p2, p3}, Landroid/widget/RelativeLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V

    .line 4
    invoke-direct {p0, p1, p2}, Les/nk;->a(Landroid/content/Context;Landroid/util/AttributeSet;)V

    return-void
.end method

.method private a()V
    .locals 5

    .line 25
    iget-object v0, p0, Les/nk;->j:Ljava/lang/String;

    const-string v1, "ad"

    invoke-virtual {v1, v0}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    .line 26
    iget-object v0, p0, Les/nk;->j:Ljava/lang/String;

    const-string v1, "video"

    invoke-virtual {v1, v0}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v0

    .line 27
    iget-object v1, p0, Les/nk;->b:Landroid/widget/TextView;

    iget-object v2, p0, Les/nk;->k:Ljava/lang/String;

    invoke-direct {p0, v1, v2}, Les/nk;->a(Landroid/view/View;Ljava/lang/String;)V

    .line 28
    iget-object v1, p0, Les/nk;->m:Ljava/lang/String;

    invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v1

    const/4 v2, 0x0

    const/16 v3, 0x8

    if-nez v1, :cond_0

    iget-object v1, p0, Les/nk;->n:Ljava/lang/String;

    invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v1

    if-nez v1, :cond_0

    .line 29
    iget-object v1, p0, Les/nk;->c:Landroid/widget/ImageView;

    iget-object v4, p0, Les/nk;->l:Ljava/lang/String;

    invoke-direct {p0, v1, v4}, Les/nk;->a(Landroid/view/View;Ljava/lang/String;)V

    .line 30
    iget-object v1, p0, Les/nk;->d:Landroid/widget/ImageView;

    iget-object v4, p0, Les/nk;->m:Ljava/lang/String;

    invoke-direct {p0, v1, v4}, Les/nk;->a(Landroid/view/View;Ljava/lang/String;)V

    .line 31
    iget-object v1, p0, Les/nk;->e:Landroid/widget/ImageView;

    iget-object v4, p0, Les/nk;->n:Ljava/lang/String;

    invoke-direct {p0, v1, v4}, Les/nk;->a(Landroid/view/View;Ljava/lang/String;)V

    .line 32
    iget-object v1, p0, Les/nk;->f:Landroid/widget/ImageView;

    invoke-virtual {v1, v3}, Landroid/widget/ImageView;->setVisibility(I)V

    .line 33
    iget-object v1, p0, Les/nk;->q:Landroid/view/ViewGroup;

    invoke-virtual {v1, v2}, Landroid/view/ViewGroup;->setVisibility(I)V

    goto :goto_0

    .line 34
    :cond_0
    iget-object v1, p0, Les/nk;->f:Landroid/widget/ImageView;

    iget-object v4, p0, Les/nk;->l:Ljava/lang/String;

    invoke-direct {p0, v1, v4}, Les/nk;->a(Landroid/view/View;Ljava/lang/String;)V

    .line 35
    iget-object v1, p0, Les/nk;->c:Landroid/widget/ImageView;

    invoke-virtual {v1, v3}, Landroid/widget/ImageView;->setVisibility(I)V

    .line 36
    iget-object v1, p0, Les/nk;->d:Landroid/widget/ImageView;

    invoke-virtual {v1, v3}, Landroid/widget/ImageView;->setVisibility(I)V

    .line 37
    iget-object v1, p0, Les/nk;->e:Landroid/widget/ImageView;

    invoke-virtual {v1, v3}, Landroid/widget/ImageView;->setVisibility(I)V

    .line 38
    iget-object v1, p0, Les/nk;->q:Landroid/view/ViewGroup;

    invoke-virtual {v1, v3}, Landroid/view/ViewGroup;->setVisibility(I)V

    .line 39
    :goto_0
    iget-object v1, p0, Les/nk;->g:Landroid/widget/ImageView;

    if-eqz v0, :cond_1

    goto :goto_1

    :cond_1
    const/16 v2, 0x8

    :goto_1
    invoke-virtual {v1, v2}, Landroid/widget/ImageView;->setVisibility(I)V

    .line 40
    iget-object v0, p0, Les/nk;->h:Landroid/widget/TextView;

    iget-object v1, p0, Les/nk;->o:Ljava/lang/String;

    invoke-direct {p0, v0, v1}, Les/nk;->a(Landroid/view/View;Ljava/lang/String;)V

    .line 41
    iget-object v0, p0, Les/nk;->i:Landroid/widget/TextView;

    iget-object v1, p0, Les/nk;->p:Ljava/lang/String;

    invoke-direct {p0, v0, v1}, Les/nk;->a(Landroid/view/View;Ljava/lang/String;)V

    return-void
.end method

.method private a(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .locals 1

    const-string p2, "layout_inflater"

    .line 1
    invoke-virtual {p1, p2}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object p1

    check-cast p1, Landroid/view/LayoutInflater;

    const p2, 0x7f0c029d

    const/4 v0, 0x1

    .line 2
    invoke-virtual {p1, p2, p0, v0}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;

    move-result-object p1

    iput-object p1, p0, Les/nk;->a:Landroid/view/View;

    const p2, 0x7f090be9

    .line 3
    invoke-virtual {p1, p2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object p1

    check-cast p1, Landroid/widget/TextView;

    iput-object p1, p0, Les/nk;->b:Landroid/widget/TextView;

    .line 4
    iget-object p1, p0, Les/nk;->a:Landroid/view/View;

    const p2, 0x7f090532

    invoke-virtual {p1, p2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object p1

    check-cast p1, Landroid/widget/ImageView;

    iput-object p1, p0, Les/nk;->c:Landroid/widget/ImageView;

    .line 5
    iget-object p1, p0, Les/nk;->a:Landroid/view/View;

    const p2, 0x7f090536

    invoke-virtual {p1, p2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object p1

    check-cast p1, Landroid/widget/ImageView;

    iput-object p1, p0, Les/nk;->d:Landroid/widget/ImageView;

    .line 6
    iget-object p1, p0, Les/nk;->a:Landroid/view/View;

    const p2, 0x7f090538

    invoke-virtual {p1, p2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object p1

    check-cast p1, Landroid/widget/ImageView;

    iput-object p1, p0, Les/nk;->e:Landroid/widget/ImageView;

    .line 7
    iget-object p1, p0, Les/nk;->a:Landroid/view/View;

    const p2, 0x7f09052d

    invoke-virtual {p1, p2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object p1

    check-cast p1, Landroid/widget/ImageView;

    iput-object p1, p0, Les/nk;->f:Landroid/widget/ImageView;

    .line 8
    iget-object p1, p0, Les/nk;->a:Landroid/view/View;

    const p2, 0x7f090d6c

    invoke-virtual {p1, p2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object p1

    check-cast p1, Landroid/widget/ImageView;

    iput-object p1, p0, Les/nk;->g:Landroid/widget/ImageView;

    .line 9
    iget-object p1, p0, Les/nk;->a:Landroid/view/View;

    const p2, 0x7f09018d

    invoke-virtual {p1, p2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object p1

    check-cast p1, Landroid/widget/TextView;

    iput-object p1, p0, Les/nk;->h:Landroid/widget/TextView;

    .line 10
    iget-object p1, p0, Les/nk;->a:Landroid/view/View;

    const p2, 0x7f09019a

    invoke-virtual {p1, p2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object p1

    check-cast p1, Landroid/widget/TextView;

    iput-object p1, p0, Les/nk;->i:Landroid/widget/TextView;

    .line 11
    iget-object p1, p0, Les/nk;->a:Landroid/view/View;

    const p2, 0x7f090b91

    invoke-virtual {p1, p2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object p1

    check-cast p1, Landroid/view/ViewGroup;

    iput-object p1, p0, Les/nk;->q:Landroid/view/ViewGroup;

    return-void
.end method

.method private a(Landroid/view/View;Ljava/lang/String;)V
    .locals 1

    .line 42
    invoke-static {p2}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v0

    if-eqz v0, :cond_0

    const/16 p2, 0x8

    .line 43
    invoke-virtual {p1, p2}, Landroid/view/View;->setVisibility(I)V

    goto :goto_0

    :cond_0
    const/4 v0, 0x0

    .line 44
    invoke-virtual {p1, v0}, Landroid/view/View;->setVisibility(I)V

    .line 45
    instance-of v0, p1, Landroid/widget/TextView;

    if-eqz v0, :cond_1

    .line 46
    check-cast p1, Landroid/widget/TextView;

    invoke-virtual {p1, p2}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    goto :goto_0

    .line 47
    :cond_1
    instance-of v0, p1, Landroid/widget/ImageView;

    if-eqz v0, :cond_2

    .line 48
    check-cast p1, Landroid/widget/ImageView;

    invoke-static {p2, p1}, Lcom/estrongs/android/icon/loader/c;->b(Ljava/lang/String;Landroid/widget/ImageView;)V

    :cond_2
    :goto_0
    return-void
.end method

.method private a(Lcom/baidu/mobads/nativecpu/IBasicCPUData;)V
    .locals 5

    .line 12
    invoke-interface {p1}, Lcom/baidu/mobads/nativecpu/IBasicCPUData;->getImageUrls()Ljava/util/List;

    move-result-object v0

    .line 13
    invoke-interface {p1}, Lcom/baidu/mobads/nativecpu/IBasicCPUData;->getSmallImageUrls()Ljava/util/List;

    move-result-object v1

    const/4 v2, 0x0

    if-eqz v1, :cond_0

    .line 14
    invoke-interface {v1}, Ljava/util/List;->size()I

    move-result v3

    const/4 v4, 0x2

    if-le v3, v4, :cond_0

    .line 15
    invoke-interface {v1, v2}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object p1

    check-cast p1, Ljava/lang/String;

    iput-object p1, p0, Les/nk;->l:Ljava/lang/String;

    const/4 p1, 0x1

    .line 16
    invoke-interface {v1, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object p1

    check-cast p1, Ljava/lang/String;

    iput-object p1, p0, Les/nk;->m:Ljava/lang/String;

    .line 17
    invoke-interface {v1, v4}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object p1

    check-cast p1, Ljava/lang/String;

    iput-object p1, p0, Les/nk;->n:Ljava/lang/String;

    goto :goto_0

    :cond_0
    const-string v1, ""

    if-eqz v0, :cond_1

    .line 18
    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v3

    if-lez v3, :cond_1

    .line 19
    invoke-interface {v0, v2}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object p1

    check-cast p1, Ljava/lang/String;

    iput-object p1, p0, Les/nk;->l:Ljava/lang/String;

    .line 20
    iput-object v1, p0, Les/nk;->m:Ljava/lang/String;

    .line 21
    iput-object v1, p0, Les/nk;->n:Ljava/lang/String;

    goto :goto_0

    .line 22
    :cond_1
    invoke-interface {p1}, Lcom/baidu/mobads/nativecpu/IBasicCPUData;->getThumbUrl()Ljava/lang/String;

    move-result-object p1

    iput-object p1, p0, Les/nk;->l:Ljava/lang/String;

    .line 23
    iput-object v1, p0, Les/nk;->m:Ljava/lang/String;

    .line 24
    iput-object v1, p0, Les/nk;->n:Ljava/lang/String;

    :goto_0
    return-void
.end method


# virtual methods
.method public setItemData(Lcom/baidu/mobads/nativecpu/IBasicCPUData;)V
    .locals 2

    if-eqz p1, :cond_2

    .line 1
    invoke-interface {p1}, Lcom/baidu/mobads/nativecpu/IBasicCPUData;->getType()Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Les/nk;->j:Ljava/lang/String;

    .line 2
    invoke-interface {p1}, Lcom/baidu/mobads/nativecpu/IBasicCPUData;->getTitle()Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Les/nk;->k:Ljava/lang/String;

    .line 3
    invoke-direct {p0, p1}, Les/nk;->a(Lcom/baidu/mobads/nativecpu/IBasicCPUData;)V

    .line 4
    iget-object v0, p0, Les/nk;->j:Ljava/lang/String;

    const-string v1, "ad"

    invoke-virtual {v1, v0}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v0

    if-nez v0, :cond_0

    goto :goto_0

    .line 5
    :cond_0
    invoke-interface {p1}, Lcom/baidu/mobads/nativecpu/IBasicCPUData;->getBrandName()Ljava/lang/String;

    move-result-object p1

    iput-object p1, p0, Les/nk;->o:Ljava/lang/String;

    .line 6
    invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result p1

    if-eqz p1, :cond_1

    .line 7
    invoke-virtual {p0}, Landroid/widget/RelativeLayout;->getContext()Landroid/content/Context;

    move-result-object p1

    const v0, 0x7f1101b2

    invoke-virtual {p1, v0}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object p1

    iput-object p1, p0, Les/nk;->o:Ljava/lang/String;

    .line 8
    :cond_1
    invoke-virtual {p0}, Landroid/widget/RelativeLayout;->getContext()Landroid/content/Context;

    move-result-object p1

    const v0, 0x7f11007e

    invoke-virtual {p1, v0}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object p1

    iput-object p1, p0, Les/nk;->p:Ljava/lang/String;

    .line 9
    invoke-direct {p0}, Les/nk;->a()V

    :cond_2
    :goto_0
    return-void
.end method
